home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
3_0
/
CUTILSLI
/
UTILITYL
/
STDGFILE.C
< prev
next >
Wrap
Text File
|
1987-11-10
|
2KB
|
53 lines
/********************************************
* Filename: StdGFile.c
* Purpose: Standard Get File Function
* Authors: Robert E. Neville
* Date: 11/10/87
* Functions: StdGFile().
* Version 1.0
* Copyright: Hummingbird Graphics
*********************************************/
#include <MacTypes.h>
#include <StdFilePkg.h>
/****************************************************************
* Function: StdGFile(fname, vref, nTypes, tList, pt)
* Purpose: Display Standard File Dialog
* Passed: fname - Ptr to FileName
* vref - Ptr to Volume Reference No.
* nTypes - Number of Types (4 max)
* tList - Ptr to Type List
* pt - Point - Top/Left Location
* Returned: TRUE - If operation successful
* FALSE - Cancel Hit
*****************************************************************/
StdGFile(fName, vRef, nTypes, tList, pt)
Str255 *fName; /* Ptr to fileName */
short *vRef; /* Ptr to Volume Ref */
short nTypes; /* Number of Types */
SFTypeList *tList; /* Ptr to Type List */
Point pt; /* Where to place the Dialog */
{
SFReply reply; /* Std Get File Array */
SFGetFile( /* StdFile Dialog */
pt, /* where */
"\p", /* No prompt string */
0L, /* File Filter */
nTypes, /* Number of types */
tList, /* The Types */
0L, /* Dlghook */
&reply); /* Store reply */
if(reply.good)
{
BlockMove(reply.fName,fName,sizeof(reply.fName));
*vRef = reply.vRefNum; /* *vref = reply.vRefNum */
return(TRUE);
}
return(FALSE);
} /* End of StdGFile */
/********** End of File **********/